<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-rim-auto-match" content="none">
<meta name="format-detection" content="telephone=no, email=no">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
<link rel="stylesheet" href="<?php echo $_BASE_DIR?>yajian/css/common.css" />
<link rel="stylesheet" href="<?php echo $_BASE_DIR?>yajian/css/warehouse_list.css" />
	<script type="text/javascript" src="<?php echo $_BASE_DIR?>point/js/jquery-3.2.0.min.js"></script>
<title>仓库列表</title>
</head>
<?php  echo Helper_Common::register_jssdk(false);?>
<body>
<header class="header">
	<a class="back" href="javascript:history.back(-1)"></a>
	<div class="title">仓库列表</div>
</header>

<div class="search-box">
	<div class="search clearfix">
	<form method="post" action="/web/warhouse">
		<div class="search-icon">
			<select name="eare">
			    <option selected="selected">选择片区</option>	
			    <?php 
			    if(count($regionlist))
			    foreach ($regionlist as $k=>$v){?>
				<option value="<?php echo $k?>"><?php echo $v?></option>			
               <?php }?>
			</select>
			
		</div>
		
  
		<input name="content" placeholder="请输入名称/地址" type="text" value="<?php echo $param['content']?>" />
		<input type="submit" class="ssbtn" value="搜索" />
	
	</form>
		
	</div>
</div>


<div class="kucun_box">

	<ul class="driver-list" id="normal_content">	
	<?php if(count($warhouse)){
	foreach ($warhouse as $v){
	   
	    ?>
		<li class="clearfix">			
				<div class="right">
						<div class="clearfix">
							<p class="driver-name">名字：<span><?php echo $v->name?></span></p></div>
						<div class="clearfix line1">
							<a href="<?php echo 'tel:'.$v->staff->mobile ?>"> <p class="phone-num float_l">联系人：<span><?php echo $v->staff->realname.'（'.$v->staff->mobile.'）'?></span></p> <span class="infoicon1 float_r"></span></a></div>
						<div class="clearfix line1">
							<a href="<?php echo 'tel:'.$v->mobile?>" style="color : #B0B0B0">	<p class="phone-num float_l length">座机：<span><?php echo $v->mobile?></span></p><span class="infoicon1 float_r"></span></a></div>
						
						<div class="clearfix line1 address" data-lng= <?php echo $v->lng?>  data-lat= <?php echo $v->lat ?>  data-address = "<?php echo $v->address?>"  >
							<p class="phone-num float_l length">地址：<span><?php echo $v->address?> </span></p><span class="infoicon2 float_r"></span></div>				
				</div>
			
		</li>
		<?php }
	}?>
		

	</ul>
	 <script>

			$('.address').click(function(){
				var address = $(this).attr('data-address');
				 if(address.length < 2){
					   alert('尚未完善地址信息');return false;
				}
									
				lng = parseFloat($(this).attr('data-lng'));
				lat = parseFloat($(this).attr('data-lat'));
	    	    wx.openLocation({
	    	        latitude: lat,
	    	        longitude: lng,
	    	        name: address,
	    	        address: address,
	    	        scale: 14,
	    	        infoUrl: 'http://weixin.qq.com'
	    	    });				
			});
	    </script>
	    
</div>

    <?php 
    //获取微信分享配置
    $sharelink = array();

    $title = '成都雅建--';
    global $root_dir;
    $root_dir = str_replace("\\", "/", $root_dir);
    require_once $root_dir.'/app/view/_footer.php';
     
 
   ?>


</body>
</html>
